package org.Framework.Examples;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.JWindow;


public class SnippetGrowingSize extends JWindow{

	private static final long serialVersionUID = 1L;

	public SnippetGrowingSize() {
		super();
		setBounds(400, 400, 100, 100);
		setVisible(true);
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		SnippetGrowingSize GrSnippet = new SnippetGrowingSize ();
		for (int i=10; i<400; i++) {
			GrSnippet.setBounds(400 - (i/2), 300 - (i/2), i, i);
		}
		 MouseListener ml=new MouseAdapter()  
		 {  
		  public void mousePressed(MouseEvent evt)  
		  {  
		   //Exit application  
		   System.exit(0);  
		  }  
		 };  
		  
		 //Add Mouse Listener to JWindow  
		 GrSnippet.addMouseListener(ml);  

	}

}
